<template>
  <div class="page47" v-loading="loading">
    <div class="page-title">重点指标收入完成情况</div>
    <div class="tableBox">
      <el-table
        :data="tableData"
        border
        class="tableTh28"
      >
      <el-table-column label="省内考核口径" prop="index_name" align="center"></el-table-column>
      <el-table-column label="本月完成" align="center">
        <el-table-column label="本月完成" prop="this_month_income" align="center"></el-table-column>
        <el-table-column label="上月完成" prop="last_month_income" align="center"></el-table-column>
        <el-table-column label="环比变化" prop="hb_mon_inrease_amt" align="center"></el-table-column>
      </el-table-column>
      <el-table-column label="累计完成" align="center">
        <el-table-column label="本年累计" prop="this_year_lj_income" align="center"></el-table-column>
        <el-table-column label="上年同期" prop="last_year_lj_income" align="center"></el-table-column>
        <el-table-column label="累计增长" prop="tb_year_inrease_amt" align="center"></el-table-column>
        <el-table-column label="增长率" prop="tb_year_inrease" align="center"></el-table-column>
        <el-table-column label="拉动贡献" prop="ld_income" align="center"></el-table-column>
      </el-table-column>
      <el-table-column label="省内预算" align="center">
        <el-table-column label="全年预算" prop="this_year_budget" align="center"></el-table-column>
        <el-table-column label="预算进度" prop="complete_year_budget" align="center"></el-table-column>
        <el-table-column label="累计预算" prop="this_month_complete" align="center"></el-table-column>
        <el-table-column label="累计盈缺" prop="this_month_gap" align="center"></el-table-column>
      </el-table-column>
      </el-table>
    </div>
  </div>
</template>
<script>
import { $budgetAPI } from "@/api";
// import { mergeSpan } from "@/utils/mixin";
export default {
  props: {
    form: {
      type: Object,
      default: () => ({})
    }
  },
  data(){
    return {
      loading: false,
      tableData: [],
      // spanArr: [],
    }
  },
  created(){
    
  },
  methods: {
    getData(){
      this.loading = true;
      $budgetAPI.getCountyOperationPage47(
        { 
          token: this.form.token, 
          areaId: this.form.areaId, 
          acctMonth: this.form.month,
        },
        res => {
          if(res.code == 0){
            this.tableData = res.content;
            // this.spanArr = mergeSpan(this.tableData, ["index_name"]);
          }
          this.loading = false;  
        },
        err => {
          console.log(err);
          this.loading = false;
        }
      )
    },
    // spanMethod({ row, column, rowIndex, columnIndex }) {
    //   if (columnIndex == 0) {
    //     return this.spanArr[rowIndex][columnIndex];
    //   }
    // },
  },
}
</script>
<style lang="scss" scoped>
.page47 {
  padding: 20px 10px;
  border: 1px solid #dee5f3;
  border-radius: 5px;
  margin-top: 20px;
  .page-title {
    text-align: center;
    font-size: 20px;
    font-weight: 900;
  }
  .tableBox {
    margin-top: 20px;
  }
}
</style>